package com.gr.experimental.model.impl.distr.operators;

public abstract class AbstractBinaryNumericToNumericOperator
extends AbstractBinaryNumericOperator{

	public AbstractBinaryNumericToNumericOperator(Class<?> argument1Type,
			Class<?> argument2Type) {
		super(argument1Type, argument2Type);
	}

	@Override
	public Class<?> getReturnType() {
		switch (typeConvertionCase) {
		case DOUBLE_DOUBLE: 
		case INT_DOUBLE:	
		case DOUBLE_LONG:   
		case DOUBLE_INT:    
		case LONG_DOUBLE:	
			return Double.class;
		case LONG_LONG:	
		case LONG_INT:	
		case INT_LONG:	
			return Long.class; 
		case INT_INT:	
			return Integer.class; 
		}
		throw new IllegalStateException("Unrecognized type convertion: " + typeConvertionCase);
	}

}
